import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const usePhoneInfoStore = defineStore(
  'phoneInfo',
  () => {
    /** 手机信息*/
    const phone = ref()
    /**修改token */
    const setPhone = (val) => {
      phone.value = val
    }
    /**删除token */
    const deletePhone = () => {
      phone.value = undefined
    }

    return { phone, setPhone, deletePhone }
  },
  {
    // 数据持久化
    persist: true,
  },
)
